package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.domain.Role;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    void deleteByPrimaryKey(Long id);

    void insert(Role entity);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    void updateByPrimaryKey(Role entity);

    Integer query4Count(QueryObject qo);

    List<Role> query4List(QueryObject qo);

    void deleteRelationWithPermission(Long id);

    void buildRelationWithPermission(@Param("roleId") Long roleId,@Param("permissionId") Long permissionId);

    List<Long> getRoleByEmployeeId(Long employeeId);

    List<String> getRoleSnByEmployeeId(Long employeeId);
}